import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import news from '@/components/news'
import login from '@/components/login'
import reg from '@/components/reg'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      component: home,
      children: [
        { path: '/home/login', component: login },
        { path: '/home/reg', component: reg }
      ]
    },
    {
      path: '/news',
      component: news
    }
  ],
  linkActiveClass: 'active'
})
